<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.stylethem {
	color: #000 !important;
	font-weight: bold !important;
	font-size: 24px !important;
}
.stylethem1 {font-weight: bold !important;}
-->
</style>
<script language="JavaScript" type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script language="JavaScript" type="text/javascript" src="ckeditor/sample.js"></script>
<script type="text/javascript" >
	function ham_jjj_3()
	{
		document.getElementById("sss2").style.display="block";
	}
</script>
</head>
<body>
<?php
	$id=$_REQUEST["id"];
	$result=mysql_query("SELECT * FROM gioithieu WHERE magioithieu = $id");
	$row=mysql_fetch_assoc($result);
		$ten = $row['ten'];
		$chitiet = $row['chitiet'];
?>

    <form action="<?php echo "?thamso=suagioithieu&id=$id"; ?>" method="post" enctype="multipart/form-data" name="form1">
      <table width="400" border="0" align="center" cellpadding="3" cellspacing="3">
        <tr align="center" bgcolor="#333333">
          <td colspan="2"><span class="stylethem">Giới thiệu</span></td>
        </tr>
        <tr bgcolor="#F2F2F2">
            <td width="20%">
                <strong>Tên Bài Viết: </strong>
            </td>
            <td width="80%">
                <input type='text' name='txttsp' size='50' disabled="disabled" value="<?php	echo $ten;	?>"/>
            </td>
        </tr>
        <tr>
			<td width='20%' style="vertical-align: middle;">
            	<strong>Chi Tiết: </strong>
            </td>
			<td width='80%'>
            	<textarea id="tinhnang" name="tinhnang" rows="60" cols="200"><?php	echo $chitiet;	?></textarea>
    				<?php
								include_once ('ckeditor/ckeditor.php') ;
								require_once ('ckfinder/ckfinder.php') ;
								$ckeditor = new CKEditor( ) ; 
								$ckeditor->basePath = '/images/' ;
								CKFinder::SetupCKEditor( $ckeditor, 'ckfinder/' ) ;
								$ckeditor->replace("tinhnang");
					?>    
			</td>
        </tr>
        <tr align="center" bgcolor="#CFCFCF">
        	<td width='20%'>&nbsp;</td>
			<td width='80%'><input type="submit" class="nut_chapnhan" value="Cháº¥p nháº­n" name="them"></td>
        </tr>  
      </table>
    </form>
</body>
</html>
<?php
	
	if(isset($_POST["them"]))
	{
		$ten = $_POST['txttsp'];
		$chitiet = $_POST['tinhnang'];
		$sql = "UPDATE `gioithieu` SET `chitiet` = '$chitiet'
		WHERE `magioithieu` = $id";
		$result = mysql_query($sql);
		if($result)
		{
			echo "<script>alert('Sửa thành công');</script>";
			echo"<script>window.location=('?thamso=gioithieu');</script>";
		}
	}
?>